<?php
include 'DatabaseConnection.php';
$connect = new DatabaseConnection('localhost','root');
$connect->set_Address();
$data = $connect->returns_Field('lyc','worker_account','url','dbname');

session_start();
$_SESSION['currentuser'] = $data;

if(!is_dir(dirname(__FILE__).'/../../uploaded/'.$data))
    mkdir(dirname(__FILE__).'/../../uploaded/'.$data,'0777');

$dbconfig = array(
	'connectionString' => 'mysql:host=localhost;dbname='.$data,
	'emulatePrepare' => true,
	'username' => $data,
	'password' => $data,
	'charset' => 'utf8',
	'enableProfiling'=>true,
   	'enableParamLogging'=>true,
);
return $dbconfig;
